package cn.edu.abtu.controller;

import cn.edu.abtu.vo.ResponseData;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;

@RestController
@CrossOrigin
@RequestMapping("/eduservice/user")
public class EduUserController {

    @PostMapping("/login")
    public ResponseData login(String username, String password) {
        String token = "jjsjsvd";
        HashMap<String, Object> hashMap = new HashMap<>();
        hashMap.put("token", "111111111111");
        return ResponseData.success("登录成功", hashMap);
    }

    @GetMapping("/info")
    public ResponseData info() {
        HashMap<String, Object> hashMap = new HashMap<>();
        hashMap.put("roles", "20191446");
        hashMap.put("name", "龚远滔");
        hashMap.put("avatar", "https://guli-file-190513.oss-cn-beijing.aliyuncs.com/cover/default.gif");
        return ResponseData.success(hashMap);
    }


}
